package com.idp.web.test.service.impl;
import com.idp.web.test.service.ProductStatusService;
import com.idp.web.test.dao.ProductStatusDao;
import com.idp.web.test.entity.ProductStatus;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.idp.common.persistence.Page;
import com.idp.common.util.ResourceUtils;

/**
 * 
 * 产品状态service实现类
 * 
 * <pre>
 * 	历史记录：
 * 	2017-06-05 Amber
 * 	新建文件
 * </pre>
 * 
 * @author 
 * <pre>
 * SD
 * 	Amber
 * PG
 *	Amber
 * UT
 *
 * MA
 * </pre>
 * @version $Rev$
 *
 * <p/> $Id$
 *
 */
@Service("productStatusService")
public class ProductStatusServiceImpl implements ProductStatusService {

	@Resource
	private ProductStatusDao productStatusDao;
	
	@Override
	public Page<ProductStatus> findByPage(ProductStatus productStatus, Page<ProductStatus> page) {

		page.setResult(productStatusDao.find(productStatus, page));
		
		return page;
	}
	
	@Override
	public List<ProductStatus> findBySearch(ProductStatus productStatus) {

		return productStatusDao.find(productStatus);
	}
	
	@Override
	public ProductStatus getById(Integer id) {

		return productStatusDao.getById(id);
	}

	@Override
	public void add(ProductStatus productStatus) {

		productStatusDao.add(productStatus);
	}
	
	@Override
	public void update(ProductStatus productStatus) {

		productStatusDao.update(productStatus);
	}

	@Override
	public void delete(Integer id) {

		productStatusDao.delete(id);
	}
 	
}